package cn.wolfcode.service;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.qo.QueryObject;
import com.github.pagehelper.PageInfo;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface IEmployeeService {
    void insert(Employee employee, Long[] ids);
    void delete(Long id);
    void update(Employee employee, Long[] ids);
    Employee select(Long id);
    List<Employee> listAll();
    //分页查询的方法
    PageInfo<Employee> query(QueryObject qo);

    Employee login(String username, String password);

    boolean updatePwd(Employee employee, String oldPassword, String newPassword);

    void resetPwd(Long id, String newPassword);

    void batchDelete(Long[] ids);

    Employee selectByName(String name);

    void resetStatus(Employee employee);

    /**
     * 导出
     * @return
     */
    Workbook exportXls();

    /**
     * 导入
     * @param file
     */
    void importXls(MultipartFile file) throws IOException;

    //根据角色编码来查询员工
    List<Employee> selectByRoleSn(String... sns);
}
